home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 5 / BBS in a Box -Volume V (BBS in a Box) (April 1992).iso / Files / Prog / M / Lex.cpt / Lex / LEXLIB.π folder / YYLEX.C < prev   
MacBinary  |  1990-03-15  |  4.8 KB  |  [TEXT/KAHL]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Wed Mar 14 20:24:32 1990, modified Wed Mar 14 20:24:32 1990, creator Think C, type ASCII, 4320 bytes "YYLEX.C" , at 0x1160 382 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[KAHL]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 07 59 59 4c 45 58 2e | 43 00 00 00 00 00 00 00 |..YYLEX.|C.......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 00 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 10 e0 00 | 00 01 7e a2 24 9f 50 a2 |........|..~.$.P.|
|00000060| 24 9f 50 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |$.P.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 42 8f 00 00 |........|....B...|
|00000080| 2f 2a 0d 20 20 48 45 41 | 44 45 52 3a 20 43 55 47 |/*. HEA|DER: CUG|
|00000090| 20 20 20 20 6e 6e 6e 2e | 6e 6e 3b 0d 20 20 54 49 | nnn.|nn;. TI|
|000000a0| 54 4c 45 3a 09 4c 45 58 | 20 2d 20 41 20 4c 65 78 |TLE:.LEX| - A Lex|
|000000b0| 69 63 61 6c 20 41 6e 61 | 6c 79 73 65 72 20 47 65 |ical Ana|lyser Ge|
|000000c0| 6e 65 72 61 74 6f 72 0d | 20 20 56 45 52 53 49 4f |nerator.| VERSIO|
|000000d0| 4e 3a 20 20 20 20 20 20 | 20 31 2e 30 20 66 6f 72 |N: | 1.0 for|
|000000e0| 20 49 42 4d 2d 50 43 0d | 20 20 44 41 54 45 3a 09 | IBM-PC.| DATE:.|
|000000f0| 4a 61 6e 20 33 30 2c 20 | 31 39 38 35 0d 20 20 44 |Jan 30, |1985. D|
|00000100| 45 53 43 52 49 50 54 49 | 4f 4e 3a 20 20 20 41 20 |ESCRIPTI|ON: A |
|00000110| 4c 65 78 69 63 61 6c 20 | 41 6e 61 6c 79 73 65 72 |Lexical |Analyser|
|00000120| 20 47 65 6e 65 72 61 74 | 6f 72 2e 20 46 72 6f 6d | Generat|or. From|
|00000130| 20 55 4e 49 58 0d 20 20 | 4b 45 59 57 4f 52 44 53 | UNIX. |KEYWORDS|
|00000140| 3a 20 20 20 20 20 20 4c | 65 78 69 63 61 6c 20 41 |: L|exical A|
|00000150| 6e 61 6c 79 73 65 72 20 | 47 65 6e 65 72 61 74 6f |nalyser |Generato|
|00000160| 72 20 59 41 43 43 20 43 | 20 50 52 45 50 0d 20 20 |r YACC C| PREP. |
|00000170| 53 59 53 54 45 4d 3a 09 | 49 42 4d 2d 50 43 20 61 |SYSTEM:.|IBM-PC a|
|00000180| 6e 64 20 43 6f 6d 70 61 | 74 69 61 62 6c 65 73 0d |nd Compa|tiables.|
|00000190| 20 20 46 49 4c 45 4e 41 | 4d 45 3a 20 20 20 20 20 | FILENA|ME: |
|000001a0| 20 59 59 4c 45 58 2e 43 | 0d 20 20 57 41 52 4e 49 | YYLEX.C|. WARNI|
|000001b0| 4e 47 53 3a 20 20 20 20 | 20 20 54 68 69 73 20 70 |NGS: | This p|
|000001c0| 72 6f 67 72 61 6d 20 69 | 73 20 6e 6f 74 20 66 6f |rogram i|s not fo|
|000001d0| 72 20 74 68 65 20 63 61 | 73 75 61 6c 20 75 73 65 |r the ca|sual use|
|000001e0| 72 2e 20 49 74 20 77 69 | 6c 6c 0d 09 62 65 20 75 |r. It wi|ll..be u|
|000001f0| 73 65 66 75 6c 20 70 72 | 69 6d 61 72 69 6c 79 20 |seful pr|imarily |
|00000200| 74 6f 20 65 78 70 65 72 | 74 20 64 65 76 65 6c 6f |to exper|t develo|
|00000210| 70 65 72 73 2e 0d 20 20 | 43 52 43 3a 09 4e 2f 41 |pers.. |CRC:.N/A|
|00000220| 0d 20 20 53 45 45 2d 41 | 4c 53 4f 3a 20 20 20 20 |. SEE-A|LSO: |
|00000230| 20 20 59 41 43 43 20 61 | 6e 64 20 50 52 45 50 0d | YACC a|nd PREP.|
|00000240| 20 20 41 55 54 48 4f 52 | 53 3a 20 20 20 20 20 20 | AUTHOR|S: |
|00000250| 20 53 63 6f 74 74 20 47 | 75 74 68 65 72 79 20 31 | Scott G|uthery 1|
|00000260| 31 31 30 30 20 6c 65 61 | 66 77 6f 6f 64 20 6c 61 |1100 lea|fwood la|
|00000270| 6e 65 20 41 75 73 74 69 | 6e 2c 20 54 58 20 37 38 |ne Austi|n, TX 78|
|00000280| 37 35 30 0d 20 20 43 4f | 4d 50 49 4c 45 52 53 3a |750. CO|MPILERS:|
|00000290| 20 20 20 20 20 44 45 53 | 4d 45 54 2d 43 0d 20 20 | DES|MET-C. |
|000002a0| 52 45 46 45 52 45 4e 43 | 45 53 3a 20 20 20 20 55 |REFERENC|ES: U|
|000002b0| 4e 49 58 20 53 79 73 74 | 65 6d 73 20 4d 61 6e 75 |NIX Syst|ems Manu|
|000002c0| 61 6c 73 0d 2a 2f 0d 2f | 2a 0d 20 2a 20 42 6f 62 |als.*/./|*. * Bob|
|000002d0| 20 44 65 6e 6e 79 20 32 | 38 2d 41 75 67 2d 38 32 | Denny 2|8-Aug-82|
|000002e0| 20 20 52 65 6d 6f 76 65 | 20 72 65 66 65 72 65 6e | Remove| referen|
|000002f0| 63 65 20 74 6f 20 73 74 | 64 69 6f 2e 68 0d 20 2a |ce to st|dio.h. *|
|00000300| 20 52 65 6d 6f 76 65 20 | 63 6f 64 65 20 74 6f 20 | Remove |code to |
|00000310| 64 65 66 61 75 6c 74 20 | 6c 65 78 69 6e 2c 20 63 |default |lexin, c|
|00000320| 68 61 6e 67 65 20 74 6f | 20 63 61 6c 6c 20 74 6f |hange to| call to|
|00000330| 0d 20 2a 20 6c 6c 73 74 | 69 6e 28 29 2c 20 67 65 |. * llst|in(), ge|
|00000340| 6e 65 72 61 74 65 64 20 | 62 79 20 6c 65 78 20 64 |nerated |by lex d|
|00000350| 65 70 65 6e 64 69 6e 67 | 20 75 70 6f 6e 20 73 65 |epending| upon se|
|00000360| 74 74 69 6e 67 0d 20 2a | 20 6f 66 20 22 2d 73 22 |tting. *| of "-s"|
|00000370| 20 73 77 69 74 63 68 2e | 20 20 45 6c 69 6d 69 6e | switch.| Elimin|
|00000380| 61 74 65 73 20 68 61 72 | 64 77 69 72 65 64 20 64 |ates har|dwired d|
|00000390| 65 70 65 6e 64 65 6e 63 | 79 0d 20 2a 20 6f 6e 20 |ependenc|y. * on |
|000003a0| 73 74 61 6e 64 61 72 64 | 20 49 2f 4f 20 6c 69 62 |standard| I/O lib|
|000003b0| 72 61 72 79 2e 20 20 4d | 6f 76 65 64 20 64 65 63 |rary. M|oved dec|
|000003c0| 6c 61 72 61 74 69 6f 6e | 20 6f 66 0d 20 2a 20 6c |laration| of. * l|
|000003d0| 65 78 69 6e 20 74 6f 20 | 6c 65 78 67 65 74 63 28 |exin to |lexgetc(|
|000003e0| 29 2e 0d 20 2a 0d 20 2a | 20 42 6f 62 20 44 65 6e |).. *. *| Bob Den|
|000003f0| 6e 79 20 33 31 2d 41 75 | 67 2d 38 32 20 20 41 64 |ny 31-Au|g-82 Ad|
|00000400| 64 20 63 61 6c 6c 20 74 | 6f 20 6c 65 78 73 77 69 |d call t|o lexswi|
|00000410| 74 63 68 28 29 20 69 6e | 0d 20 2a 20 74 68 65 20 |tch() in|. * the |
|00000420| 67 65 6e 65 72 61 74 65 | 64 20 66 69 6c 65 2c 20 |generate|d file, |
|00000430| 74 6f 20 73 77 69 74 63 | 68 20 74 6f 20 74 68 65 |to switc|h to the|
|00000440| 20 74 61 62 6c 65 20 77 | 68 6f 73 65 0d 20 2a 20 | table w|hose. * |
|00000450| 6e 61 6d 65 20 77 61 73 | 20 67 69 76 65 6e 20 69 |name was| given i|
|00000460| 6e 20 74 68 65 20 22 2d | 74 22 20 73 77 69 74 63 |n the "-|t" switc|
|00000470| 68 20 28 6f 72 20 74 6f | 20 22 6c 65 78 74 61 62 |h (or to| "lextab|
|00000480| 22 0d 20 2a 20 69 66 20 | 22 2d 74 22 20 77 61 73 |". * if |"-t" was|
|00000490| 6e 27 74 20 67 69 76 65 | 6e 29 2e 20 20 52 65 6d |n't give|n). Rem|
|000004a0| 6f 76 65 64 20 68 61 72 | 64 77 69 72 65 64 20 73 |oved har|dwired s|
|000004b0| 65 74 74 69 6e 67 0d 20 | 2a 20 6f 66 20 5f 74 61 |etting. |* of _ta|
|000004c0| 62 70 20 2d 2d 3e 20 22 | 6c 65 78 74 61 62 22 20 |bp --> "|lextab" |
|000004d0| 68 65 72 65 2e 20 4e 6f | 77 20 68 61 6e 64 6c 65 |here. No|w handle|
|000004e0| 64 20 61 75 74 6f 6d 61 | 67 69 63 61 6c 6c 79 2e |d automa|gically.|
|000004f0| 0d 20 2a 0d 20 2a 20 42 | 6f 62 20 44 65 6e 6e 79 |. *. * B|ob Denny|
|00000500| 20 32 31 2d 4f 63 74 2d | 38 32 20 20 41 64 64 20 | 21-Oct-|82 Add |
|00000510| 6c 6c 69 6e 69 74 28 29 | 20 66 75 6e 63 74 69 6f |llinit()| functio|
|00000520| 6e 20 74 6f 20 72 65 2d | 69 6e 69 74 69 61 6c 69 |n to re-|initiali|
|00000530| 7a 65 0d 20 2a 20 79 79 | 6c 65 78 28 29 2c 20 6d |ze. * yy|lex(), m|
|00000540| 61 6b 69 6e 67 20 69 74 | 20 73 65 72 69 61 6c 6c |aking it| seriall|
|00000550| 79 20 72 65 75 73 61 62 | 6c 65 2e 0d 20 2a 0d 20 |y reusab|le.. *. |
|00000560| 2a 20 49 6e 69 74 69 61 | 6c 69 7a 65 20 5f 74 61 |* Initia|lize _ta|
|00000570| 62 70 20 74 6f 20 4e 55 | 4c 4c 20 73 6f 20 6c 65 |bp to NU|LL so le|
|00000580| 78 73 77 69 74 63 68 28 | 29 20 74 6f 20 72 65 61 |xswitch(|) to rea|
|00000590| 6c 20 74 61 62 6c 65 20 | 68 61 70 70 65 6e 73 0d |l table |happens.|
|000005a0| 20 2a 20 6f 6e 6c 79 20 | 6f 6e 63 65 2e 0d 20 2a | * only |once.. *|
|000005b0| 0d 20 2a 20 42 6f 62 20 | 44 65 6e 6e 79 20 31 35 |. * Bob |Denny 15|
|000005c0| 2d 41 70 72 2d 38 33 20 | 4d 6f 76 65 20 4e 42 50 |-Apr-83 |Move NBP|
|000005d0| 57 20 74 6f 20 4c 45 58 | 2e 48 20 61 6e 64 20 6d |W to LEX|.H and m|
|000005e0| 61 6b 65 20 69 74 20 33 | 32 20 6f 6e 20 56 41 58 |ake it 3|2 on VAX|
|000005f0| 20 6e 61 74 69 76 65 2c | 0d 20 2a 09 65 6c 73 65 | native,|. *.else|
|00000600| 20 31 36 2e 0d 20 2a 20 | 53 63 6f 74 74 20 47 75 | 16.. * |Scott Gu|
|00000610| 74 68 65 72 79 20 32 30 | 2d 4e 6f 76 2d 38 33 20 |thery 20|-Nov-83 |
|00000620| 20 20 20 20 20 41 64 61 | 70 74 20 66 6f 72 20 49 | Ada|pt for I|
|00000630| 42 4d 20 50 43 20 26 20 | 44 65 53 6d 65 74 20 43 |BM PC & |DeSmet C|
|00000640| 0d 20 2a 2f 0d 0d 2f 2a | 0d 20 2a 20 79 79 6c 65 |. */../*|. * yyle|
|00000650| 78 20 66 6f 72 20 6c 65 | 78 20 74 61 62 6c 65 73 |x for le|x tables|
|00000660| 0d 20 2a 2f 0d 23 69 66 | 64 65 66 20 20 54 48 49 |. */.#if|def THI|
|00000670| 4e 4b 5f 43 0d 23 69 6e | 63 6c 75 64 65 20 3c 73 |NK_C.#in|clude <s|
|00000680| 74 64 6c 69 62 2e 68 3e | 0d 23 65 6e 64 69 66 0d |tdlib.h>|.#endif.|
|00000690| 0d 23 69 6e 63 6c 75 64 | 65 20 22 6c 65 78 2e 68 |.#includ|e "lex.h|
|000006a0| 22 0d 0d 23 64 65 66 69 | 6e 65 20 45 52 52 4f 52 |"..#defi|ne ERROR|
|000006b0| 20 20 20 32 35 36 20 20 | 20 20 20 2f 2a 20 79 61 | 256 | /* ya|
|000006c0| 63 63 27 73 20 76 61 6c | 75 65 20 2a 2f 0d 0d 74 |cc's val|ue */..t|
|000006d0| 73 74 5f 5f 62 28 63 2c | 20 74 61 62 29 0d 72 65 |st__b(c,| tab).re|
|000006e0| 67 69 73 74 65 72 20 69 | 6e 74 20 20 20 20 63 3b |gister i|nt c;|
|000006f0| 0d 63 68 61 72 09 74 61 | 62 5b 5d 3b 0d 7b 0d 09 |.char.ta|b[];.{..|
|00000700| 72 65 74 75 72 6e 28 74 | 61 62 5b 28 63 20 3e 3e |return(t|ab[(c >>|
|00000710| 20 33 29 20 26 20 30 33 | 37 5d 20 26 20 28 31 20 | 3) & 03|7] & (1 |
|00000720| 3c 3c 20 28 63 20 26 20 | 30 37 29 29 20 29 3b 0d |<< (c & |07)) );.|
|00000730| 7d 0d 0d 73 74 72 75 63 | 74 20 20 6c 65 78 74 61 |}..struc|t lexta|
|00000740| 62 20 20 2a 5f 74 61 62 | 70 20 3d 20 30 3b 0d 0d |b *_tab|p = 0;..|
|00000750| 65 78 74 65 72 6e 20 63 | 68 61 72 20 20 20 20 20 |extern c|har |
|00000760| 2a 6c 6c 73 61 76 65 5b | 5d 3b 20 20 20 20 20 20 |*llsave[|]; |
|00000770| 2f 2a 20 52 69 67 68 74 | 2d 63 6f 6e 74 65 78 74 |/* Right|-context|
|00000780| 20 62 75 66 66 65 72 09 | 2a 2f 0d 63 68 61 72 20 | buffer.|*/.char |
|00000790| 20 20 20 6c 6c 62 75 66 | 5b 31 30 30 5d 3b 09 2f | llbuf|[100];./|
|000007a0| 2a 20 77 6f 72 6b 20 62 | 75 66 66 65 72 09 2a 2f |* work b|uffer.*/|
|000007b0| 0d 63 68 61 72 20 20 20 | 20 2a 6c 6c 70 31 20 20 |.char | *llp1 |
|000007c0| 20 3d 20 26 6c 6c 62 75 | 66 5b 30 5d 3b 20 20 20 | = &llbu|f[0]; |
|000007d0| 20 2f 2a 20 70 6f 69 6e | 74 65 72 20 74 6f 20 6e | /* poin|ter to n|
|000007e0| 65 78 74 20 61 76 61 69 | 6c 2e 20 69 6e 20 74 6f |ext avai|l. in to|
|000007f0| 6b 65 6e 20 20 20 20 20 | 20 2a 2f 0d 63 68 61 72 |ken | */.char|
|00000800| 20 20 20 20 2a 6c 6c 70 | 32 20 20 20 3d 20 26 6c | *llp|2 = &l|
|00000810| 6c 62 75 66 5b 30 5d 3b | 20 20 20 20 2f 2a 20 70 |lbuf[0];| /* p|
|00000820| 6f 69 6e 74 65 72 20 74 | 6f 20 65 6e 64 20 6f 66 |ointer t|o end of|
|00000830| 20 6c 6f 6f 6b 61 68 65 | 61 64 09 2a 2f 0d 63 68 | lookahe|ad.*/.ch|
|00000840| 61 72 20 20 20 20 2a 6c | 6c 65 6e 64 20 20 3d 20 |ar *l|lend = |
|00000850| 26 6c 6c 62 75 66 5b 30 | 5d 3b 20 20 20 20 2f 2a |&llbuf[0|]; /*|
|00000860| 20 70 6f 69 6e 74 65 72 | 20 74 6f 20 65 6e 64 20 | pointer| to end |
|00000870| 6f 66 20 74 6f 6b 65 6e | 09 2a 2f 0d 63 68 61 72 |of token|.*/.char|
|00000880| 20 20 20 20 2a 6c 6c 65 | 62 75 66 20 3d 20 26 6c | *lle|buf = &l|
|00000890| 6c 62 75 66 5b 73 69 7a | 65 6f 66 20 6c 6c 62 75 |lbuf[siz|eof llbu|
|000008a0| 66 5d 3b 0d 69 6e 74 20 | 20 20 20 20 6c 6c 65 6f |f];.int | lleo|
|000008b0| 66 3b 0d 69 6e 74 20 20 | 20 20 20 79 79 6c 76 61 |f;.int | yylva|
|000008c0| 6c 20 20 3d 20 30 3b 0d | 69 6e 74 20 20 20 20 20 |l = 0;.|int |
|000008d0| 79 79 6c 69 6e 65 20 20 | 3d 20 30 3b 0d 0d 79 79 |yyline |= 0;..yy|
|000008e0| 6c 65 78 28 29 0d 7b 0d | 09 72 65 67 69 73 74 65 |lex().{.|.registe|
|000008f0| 72 20 69 6e 74 20 63 2c | 20 73 74 3b 0d 09 69 6e |r int c,| st;..in|
|00000900| 74 20 66 69 6e 61 6c 2c | 20 6c 2c 20 6c 6c 6b 2c |t final,| l, llk,|
|00000910| 20 69 3b 0d 0d 09 72 65 | 67 69 73 74 65 72 20 73 | i;...re|gister s|
|00000920| 74 72 75 63 74 20 6c 65 | 78 74 61 62 20 2a 6c 70 |truct le|xtab *lp|
|00000930| 3b 0d 09 63 68 61 72 20 | 2a 63 70 3b 0d 0d 09 2f |;..char |*cp;.../|
|00000940| 2a 0d 09 2a 20 43 61 6c | 6c 20 6c 6c 73 74 69 6e |*..* Cal|l llstin|
|00000950| 28 29 20 74 6f 20 64 65 | 66 61 75 6c 74 20 6c 65 |() to de|fault le|
|00000960| 78 69 6e 20 74 6f 20 73 | 74 64 69 6e 0d 09 2a 20 |xin to s|tdin..* |
|00000970| 61 6e 64 20 61 73 73 69 | 67 6e 20 5f 74 61 62 70 |and assi|gn _tabp|
|00000980| 20 74 6f 20 22 72 65 61 | 6c 22 20 74 61 62 6c 65 | to "rea|l" table|
|00000990| 2e 0d 09 2a 2f 0d 09 6c | 6c 73 74 69 6e 28 29 3b |...*/..l|lstin();|
|000009a0| 09 2f 2a 20 49 6e 69 74 | 69 61 6c 69 7a 65 20 79 |./* Init|ialize y|
|000009b0| 79 6c 65 78 28 29 20 76 | 61 72 69 61 62 6c 65 73 |ylex() v|ariables|
|000009c0| 20 2a 2f 0d 0d 6c 6f 6f | 70 3a 0d 09 6c 6c 6b 20 | */..loo|p:..llk |
|000009d0| 3d 20 30 3b 0d 09 69 66 | 20 28 6c 6c 73 65 74 28 |= 0;..if| (llset(|
|000009e0| 29 29 0d 09 72 65 74 75 | 72 6e 28 30 29 3b 09 2f |))..retu|rn(0);./|
|000009f0| 2a 20 50 72 65 76 65 6e | 74 20 45 4f 46 20 6c 6f |* Preven|t EOF lo|
|00000a00| 6f 70 20 20 20 20 20 2a | 2f 0d 09 73 74 20 3d 20 |op *|/..st = |
|00000a10| 30 3b 0d 09 66 69 6e 61 | 6c 20 3d 20 2d 31 3b 0d |0;..fina|l = -1;.|
|00000a20| 09 6c 70 20 3d 20 5f 74 | 61 62 70 3b 0d 0d 09 64 |.lp = _t|abp;...d|
|00000a30| 6f 20 7b 0d 09 69 66 20 | 28 6c 70 2d 3e 6c 6c 6c |o {..if |(lp->lll|
|00000a40| 6f 6f 6b 20 26 26 20 28 | 6c 20 3d 20 6c 70 2d 3e |ook && (|l = lp->|
|00000a50| 6c 6c 6c 6f 6f 6b 5b 73 | 74 5d 29 29 20 7b 0d 09 |lllook[s|t])) {..|
|00000a60| 66 6f 72 20 28 63 3d 30 | 3b 20 63 3c 4e 42 50 57 |for (c=0|; c<NBPW|
|00000a70| 3b 20 63 2b 2b 29 0d 09 | 69 66 20 28 6c 26 28 31 |; c++)..|if (l&(1|
|00000a80| 3c 3c 63 29 29 0d 09 6c | 6c 73 61 76 65 5b 63 5d |<<c))..l|lsave[c]|
|00000a90| 20 3d 20 6c 6c 70 31 3b | 0d 09 6c 6c 6b 2b 2b 3b | = llp1;|..llk++;|
|00000aa0| 0d 09 7d 0d 09 69 66 20 | 28 28 69 20 3d 20 6c 70 |..}..if |((i = lp|
|00000ab0| 2d 3e 6c 6c 66 69 6e 61 | 6c 5b 73 74 5d 29 20 21 |->llfina|l[st]) !|
|00000ac0| 3d 20 2d 31 29 20 7b 0d | 09 66 69 6e 61 6c 20 3d |= -1) {.|.final =|
|00000ad0| 20 69 3b 0d 09 6c 6c 65 | 6e 64 20 3d 20 6c 6c 70 | i;..lle|nd = llp|
|00000ae0| 31 3b 0d 09 7d 0d 09 69 | 66 20 28 28 63 20 3d 20 |1;..}..i|f ((c = |
|00000af0| 6c 6c 69 6e 70 28 29 29 | 20 3c 20 30 29 0d 09 62 |llinp())| < 0)..b|
|00000b00| 72 65 61 6b 3b 0d 09 69 | 66 20 28 28 63 70 20 3d |reak;..i|f ((cp =|
|00000b10| 20 6c 70 2d 3e 6c 6c 62 | 72 6b 29 20 26 26 20 6c | lp->llb|rk) && l|
|00000b20| 6c 6b 3d 3d 30 20 26 26 | 20 74 73 74 5f 5f 62 28 |lk==0 &&| tst__b(|
|00000b30| 63 2c 20 63 70 29 29 20 | 7b 0d 09 6c 6c 70 31 2d |c, cp)) |{..llp1-|
|00000b40| 2d 3b 0d 09 62 72 65 61 | 6b 3b 0d 09 7d 0d 09 7d |-;..brea|k;..}..}|
|00000b50| 20 77 68 69 6c 65 20 28 | 28 73 74 20 3d 20 28 2a | while (|(st = (*|
|00000b60| 6c 70 2d 3e 6c 6c 6d 6f | 76 65 29 28 6c 70 2c 20 |lp->llmo|ve)(lp, |
|00000b70| 63 2c 20 73 74 29 29 20 | 21 3d 20 2d 31 29 3b 0d |c, st)) |!= -1);.|
|00000b80| 0d 0d 09 69 66 20 28 6c | 6c 70 32 20 3c 20 6c 6c |...if (l|lp2 < ll|
|00000b90| 70 31 29 0d 09 6c 6c 70 | 32 20 3d 20 6c 6c 70 31 |p1)..llp|2 = llp1|
|00000ba0| 3b 0d 09 69 66 20 28 66 | 69 6e 61 6c 20 3d 3d 20 |;..if (f|inal == |
|00000bb0| 2d 31 29 20 7b 0d 09 6c | 6c 65 6e 64 20 3d 20 6c |-1) {..l|lend = l|
|00000bc0| 6c 70 31 3b 0d 09 69 66 | 20 28 73 74 20 3d 3d 20 |lp1;..if| (st == |
|00000bd0| 30 20 26 26 20 63 20 3c | 20 30 29 0d 09 72 65 74 |0 && c <| 0)..ret|
|00000be0| 75 72 6e 28 30 29 3b 0d | 09 69 66 20 28 28 63 70 |urn(0);.|.if ((cp|
|00000bf0| 20 3d 20 6c 70 2d 3e 6c | 6c 69 6c 6c 29 20 26 26 | = lp->l|lill) &&|
|00000c00| 20 74 73 74 5f 5f 62 28 | 63 2c 20 63 70 29 29 20 | tst__b(|c, cp)) |
|00000c10| 7b 0d 09 6c 65 78 65 72 | 72 6f 72 28 22 49 6c 6c |{..lexer|ror("Ill|
|00000c20| 65 67 61 6c 20 63 68 61 | 72 61 63 74 65 72 3a 20 |egal cha|racter: |
|00000c30| 25 63 20 28 25 30 33 6f | 29 22 2c 20 63 2c 20 63 |%c (%03o|)", c, c|
|00000c40| 29 3b 0d 09 67 6f 74 6f | 20 6c 6f 6f 70 3b 0d 09 |);..goto| loop;..|
|00000c50| 7d 0d 09 72 65 74 75 72 | 6e 28 45 52 52 4f 52 29 |}..retur|n(ERROR)|
|00000c60| 3b 0d 09 7d 0d 09 69 66 | 20 28 63 20 3d 20 28 66 |;..}..if| (c = (f|
|00000c70| 69 6e 61 6c 20 3e 3e 20 | 31 31 29 20 26 20 30 33 |inal >> |11) & 03|
|00000c80| 37 29 0d 09 6c 6c 65 6e | 64 20 3d 20 6c 6c 73 61 |7)..llen|d = llsa|
|00000c90| 76 65 5b 63 2d 31 5d 3b | 0d 09 69 66 20 28 28 63 |ve[c-1];|..if ((c|
|00000ca0| 20 3d 20 28 2a 6c 70 2d | 3e 6c 6c 61 63 74 72 29 | = (*lp-|>llactr)|
|00000cb0| 28 66 69 6e 61 6c 26 30 | 33 37 37 37 29 29 20 3e |(final&0|3777)) >|
|00000cc0| 3d 20 30 29 0d 09 72 65 | 74 75 72 6e 28 63 29 3b |= 0)..re|turn(c);|
|00000cd0| 0d 09 67 6f 74 6f 20 6c | 6f 6f 70 3b 0d 7d 0d 0d |..goto l|oop;.}..|
|00000ce0| 6c 6c 69 6e 70 28 29 0d | 7b 0d 0d 09 72 65 67 69 |llinp().|{...regi|
|00000cf0| 73 74 65 72 20 63 3b 0d | 09 72 65 67 69 73 74 65 |ster c;.|.registe|
|00000d00| 72 20 73 74 72 75 63 74 | 20 6c 65 78 74 61 62 20 |r struct| lextab |
|00000d10| 2a 6c 70 3b 0d 09 72 65 | 67 69 73 74 65 72 20 63 |*lp;..re|gister c|
|00000d20| 68 61 72 20 2a 63 70 3b | 0d 0d 09 6c 70 20 3d 20 |har *cp;|...lp = |
|00000d30| 5f 74 61 62 70 3b 0d 09 | 63 70 20 3d 20 6c 70 2d |_tabp;..|cp = lp-|
|00000d40| 3e 6c 6c 69 67 6e 3b 09 | 2f 2a 20 49 67 6e 6f 72 |>llign;.|/* Ignor|
|00000d50| 65 20 63 6c 61 73 73 09 | 2a 2f 0d 09 66 6f 72 20 |e class.|*/..for |
|00000d60| 28 3b 3b 29 20 7b 0d 09 | 2f 2a 0d 09 2a 20 47 65 |(;;) {..|/*..* Ge|
|00000d70| 74 20 74 68 65 20 6e 65 | 78 74 20 63 68 61 72 61 |t the ne|xt chara|
|00000d80| 63 74 65 72 20 66 72 6f | 6d 20 74 68 65 20 73 61 |cter fro|m the sa|
|00000d90| 76 65 20 62 75 66 66 65 | 72 20 28 69 66 20 70 6f |ve buffe|r (if po|
|00000da0| 73 73 69 62 6c 65 29 0d | 09 2a 20 49 66 20 74 68 |ssible).|.* If th|
|00000db0| 65 20 73 61 76 65 20 62 | 75 66 66 65 72 27 73 20 |e save b|uffer's |
|00000dc0| 65 6d 70 74 79 2c 20 74 | 68 65 6e 20 72 65 74 75 |empty, t|hen retu|
|00000dd0| 72 6e 20 45 4f 46 20 6f | 72 20 74 68 65 20 6e 65 |rn EOF o|r the ne|
|00000de0| 78 74 0d 09 2a 20 69 6e | 70 75 74 20 63 68 61 72 |xt..* in|put char|
|00000df0| 61 63 74 65 72 2e 20 20 | 49 67 6e 6f 72 65 20 74 |acter. |Ignore t|
|00000e00| 68 65 20 63 68 61 72 61 | 63 74 65 72 20 69 66 20 |he chara|cter if |
|00000e10| 69 74 27 73 20 69 6e 20 | 74 68 65 0d 09 2a 20 69 |it's in |the..* i|
|00000e20| 67 6e 6f 72 65 20 63 6c | 61 73 73 2e 0d 09 2a 2f |gnore cl|ass...*/|
|00000e30| 0d 09 63 20 3d 20 28 6c | 6c 70 31 20 3c 20 6c 6c |..c = (l|lp1 < ll|
|00000e40| 70 32 29 20 3f 20 2a 6c | 6c 70 31 20 26 20 30 33 |p2) ? *l|lp1 & 03|
|00000e50| 37 37 20 3a 20 28 6c 6c | 65 6f 66 29 20 3f 20 45 |77 : (ll|eof) ? E|
|00000e60| 4f 46 20 3a 20 6c 65 78 | 67 65 74 63 28 29 3b 0d |OF : lex|getc();.|
|00000e70| 09 69 66 20 28 63 20 3e | 3d 20 30 29 20 7b 09 2f |.if (c >|= 0) {./|
|00000e80| 2a 20 47 6f 74 20 61 20 | 63 68 61 72 61 63 74 65 |* Got a |characte|
|00000e90| 72 3f 20 20 20 20 20 2a | 2f 0d 09 69 66 20 28 63 |r? *|/..if (c|
|00000ea0| 70 20 26 26 20 74 73 74 | 5f 5f 62 28 63 2c 20 63 |p && tst|__b(c, c|
|00000eb0| 70 29 29 0d 09 63 6f 6e | 74 69 6e 75 65 3b 20 20 |p))..con|tinue; |
|00000ec0| 20 20 20 20 20 2f 2a 20 | 49 67 6e 6f 72 65 20 69 | /* |Ignore i|
|00000ed0| 74 09 2a 2f 0d 09 69 66 | 20 28 6c 6c 70 31 20 3e |t.*/..if| (llp1 >|
|00000ee0| 3d 20 6c 6c 65 62 75 66 | 29 20 7b 20 20 20 2f 2a |= llebuf|) { /*|
|00000ef0| 20 4e 6f 2c 20 69 73 20 | 74 68 65 72 65 20 72 6f | No, is |there ro|
|00000f00| 6f 6d 3f 20 20 20 2a 2f | 0d 09 6c 65 78 65 72 72 |om? */|..lexerr|
|00000f10| 6f 72 28 22 54 6f 6b 65 | 6e 20 62 75 66 66 65 72 |or("Toke|n buffer|
|00000f20| 20 6f 76 65 72 66 6c 6f | 77 22 29 3b 0d 09 65 78 | overflo|w");..ex|
|00000f30| 69 74 28 31 29 3b 0d 09 | 7d 0d 09 2a 6c 6c 70 31 |it(1);..|}..*llp1|
|00000f40| 2b 2b 20 3d 20 63 3b 09 | 2f 2a 20 53 74 6f 72 65 |++ = c;.|/* Store|
|00000f50| 20 69 6e 20 74 6f 6b 65 | 6e 20 62 75 66 66 20 20 | in toke|n buff |
|00000f60| 2a 2f 0d 09 7d 20 65 6c | 73 65 0d 09 6c 6c 65 6f |*/..} el|se..lleo|
|00000f70| 66 20 3d 20 31 3b 09 2f | 2a 20 53 65 74 20 45 4f |f = 1;./|* Set EO|
|00000f80| 46 20 73 69 67 6e 61 6c | 20 20 20 20 20 20 20 2a |F signal| *|
|00000f90| 2f 0d 09 72 65 74 75 72 | 6e 28 63 29 3b 0d 09 7d |/..retur|n(c);..}|
|00000fa0| 0d 7d 0d 0d 6c 6c 73 65 | 74 28 29 0d 2f 2a 0d 20 |.}..llse|t()./*. |
|00000fb0| 2a 20 52 65 74 75 72 6e | 20 54 52 55 45 20 69 66 |* Return| TRUE if|
|00000fc0| 20 45 4f 46 20 61 6e 64 | 20 6e 6f 74 68 69 6e 67 | EOF and| nothing|
|00000fd0| 20 77 61 73 20 6d 6f 76 | 65 64 20 69 6e 20 74 68 | was mov|ed in th|
|00000fe0| 65 20 6c 6f 6f 6b 2d 61 | 68 65 61 64 20 62 75 66 |e look-a|head buf|
|00000ff0| 66 65 72 0d 20 2a 2f 0d | 7b 0d 09 72 65 67 69 73 |fer. */.|{..regis|
|00001000| 74 65 72 20 63 68 61 72 | 20 2a 6c 70 31 2c 20 2a |ter char| *lp1, *|
|00001010| 6c 70 32 3b 0d 0d 09 66 | 6f 72 20 28 6c 70 31 20 |lp2;...f|or (lp1 |
|00001020| 3d 20 6c 6c 62 75 66 2c | 20 6c 70 32 20 3d 20 6c |= llbuf,| lp2 = l|
|00001030| 6c 65 6e 64 3b 20 6c 70 | 32 20 3c 20 6c 6c 70 32 |lend; lp|2 < llp2|
|00001040| 3b 29 0d 09 2a 6c 70 31 | 2b 2b 20 3d 20 2a 6c 70 |;)..*lp1|++ = *lp|
|00001050| 32 2b 2b 3b 0d 09 6c 6c | 65 6e 64 20 3d 20 6c 6c |2++;..ll|end = ll|
|00001060| 70 31 20 3d 20 6c 6c 62 | 75 66 3b 0d 09 6c 6c 70 |p1 = llb|uf;..llp|
|00001070| 32 20 3d 20 6c 70 31 3b | 0d 09 72 65 74 75 72 6e |2 = lp1;|..return|
|00001080| 28 6c 6c 65 6f 66 20 26 | 26 20 6c 70 31 20 3d 3d |(lleof &|& lp1 ==|
|00001090| 20 6c 6c 62 75 66 29 3b | 0d 7d 0d 0d 2f 2a 0d 20 | llbuf);|.}../*. |
|000010a0| 2a 20 52 65 2d 69 6e 69 | 74 69 61 6c 69 7a 65 20 |* Re-ini|tialize |
|000010b0| 79 79 6c 65 78 28 29 20 | 73 6f 20 74 68 61 74 20 |yylex() |so that |
|000010c0| 69 74 20 63 61 6e 20 62 | 65 20 72 65 2d 75 73 65 |it can b|e re-use|
|000010d0| 64 20 6f 6e 0d 20 2a 20 | 61 6e 6f 74 68 65 72 20 |d on. * |another |
|000010e0| 66 69 6c 65 2e 0d 20 2a | 2f 0d 6c 6c 69 6e 69 74 |file.. *|/.llinit|
|000010f0| 28 29 0d 20 20 20 7b 0d | 20 20 20 6c 6c 70 31 20 |(). {.| llp1 |
|00001100| 3d 20 6c 6c 70 32 20 3d | 20 6c 6c 65 6e 64 20 3d |= llp2 =| llend =|
|00001110| 20 6c 6c 62 75 66 3b 0d | 20 20 20 6c 6c 65 62 75 | llbuf;.| llebu|
|00001120| 66 20 3d 20 6c 6c 62 75 | 66 20 2b 20 73 69 7a 65 |f = llbu|f + size|
|00001130| 6f 66 28 6c 6c 62 75 66 | 29 3b 0d 20 20 20 6c 6c |of(llbuf|);. ll|
|00001140| 65 6f 66 20 3d 20 79 79 | 6c 76 61 6c 20 3d 20 79 |eof = yy|lval = y|
|00001150| 79 6c 69 6e 65 20 3d 20 | 30 3b 0d 20 20 20 7d 0d |yline = |0;. }.|
|00001160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001180| 00 00 01 00 00 00 01 4c | 00 00 00 4c 00 00 00 32 |.......L|...L...2|
|00001190| 20 20 20 20 6e 6e 6e 2e | 6e 6e 3b 0d 20 20 54 49 | nnn.|nn;. TI|
|000011a0| 54 4c 45 3a 09 4c 45 58 | 20 2d 20 41 20 4c 65 78 |TLE:.LEX| - A Lex|
|000011b0| 07 59 59 4c 45 58 2e 43 | 02 00 00 00 54 45 4d 50 |.YYLEX.C|....TEMP|
|000011c0| 44 53 45 41 00 00 00 00 | 00 00 00 00 00 00 2d 75 |DSEA....|......-u|
|000011d0| 00 00 54 45 4d 50 44 53 | 45 41 00 00 00 00 00 00 |..TEMPDS|EA......|
|000011e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011f0| 00 00 a5 3c 63 ea 00 00 | 10 e0 00 00 01 7e 20 44 |...<c...|.....~ D|
|00001200| 45 53 43 52 49 50 54 49 | 4f 4e 3a 20 20 20 41 20 |ESCRIPTI|ON: A |
|00001210| 4c 65 78 69 63 61 6c 20 | 41 6e 61 6c 79 73 65 72 |Lexical |Analyser|
|00001220| 20 47 65 6e 65 72 61 74 | 6f 72 2e 20 46 72 6f 6d | Generat|or. From|
|00001230| 20 55 4e 49 58 0d 20 20 | 4b 45 59 57 4f 52 44 53 | UNIX. |KEYWORDS|
|00001240| 3a 20 20 20 20 20 20 4c | 65 78 69 63 61 6c 20 41 |: L|exical A|
|00001250| 6e 61 6c 79 73 65 72 20 | 47 65 6e 65 72 61 74 6f |nalyser |Generato|
|00001260| 72 20 59 41 43 43 20 43 | 20 50 52 45 50 0d 20 20 |r YACC C| PREP. |
|00001270| 53 59 53 54 45 4d 3a 09 | 49 42 4d 2d 50 43 20 61 |SYSTEM:.|IBM-PC a|
|00001280| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00001290| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012a0| 00 00 00 00 00 00 00 06 | 00 04 00 3c 00 24 01 53 |........|...<.$.S|
|000012b0| 01 bd 00 3c 00 24 01 53 | 01 bd a2 24 67 10 00 00 |...<.$.S|...$g...|
|000012c0| 00 00 00 00 00 00 00 00 | 00 00 01 00 00 00 01 00 |........|........|
|000012d0| 00 00 01 4c 00 00 00 4c | 00 00 00 32 00 19 47 f2 |...L...L|...2..G.|
|000012e0| 0d 3a 00 00 00 1c 00 32 | 00 00 4d 50 53 52 00 00 |.:.....2|..MPSR..|
|000012f0| 00 0a 03 ed ff ff 00 00 | 00 00 00 19 47 ae 00 00 |........|....G...|
+--------+-------------------------+-------------------------+--------+--------+